import { http } from "@/utils/http";
import type { ResultProps } from "@/api/user";

export interface MaterialTypeProp {
  id: number;
  account_id: number;
  business_id: number;
  name: string;
  note: string;
  delete_status: number;
  update_time: Date;
  create_time: Date;
}

export const getMaterialTypeList = (params?: object) => {
  return http.request<ResultProps<MaterialTypeProp[]>>(
    "get",
    "/materialType/getMaterialTypeList",
    {
      params
    }
  );
};

export const materialTypeAdd = (data?: object) => {
  return http.request<ResultProps<MaterialTypeProp[]>>(
    "post",
    "/materialType/add",
    {
      data
    }
  );
};
